package com.xy.biz.ts.domain.converter;

import java.util.Collection;
import java.util.List;

import com.xy.tool.util.BeanUtilsEx;
import com.xy.biz.ts.domain.bo.TrainUserGroupBO;
import com.xy.biz.ts.domain.po.TrainUserGroupPO;
import com.xy.biz.ts.domain.query.TrainUserGroupQuery;
//import com.xy.biz.ts.domain.resp.GetTrainUserGroupResponse;
//import com.xy.biz.ts.domain.req.SaveTrainUserGroupRequest;
//import com.xy.biz.ts.domain.req.ListTrainUserGroupRequest;

/**
 *
 *
 * @author wwj
 * @date 2021-4-1
 */
public class TrainUserGroupConverter {

	public static TrainUserGroupPO toPO(TrainUserGroupBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new TrainUserGroupPO(), true);
	}

	public static List<TrainUserGroupPO> toPO(Collection<TrainUserGroupBO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new TrainUserGroupPO(), true);
	}

	public static TrainUserGroupBO fromPO(TrainUserGroupPO source) {
		return BeanUtilsEx.copyProperties(source, () -> new TrainUserGroupBO());
	}

	public static List<TrainUserGroupBO> fromPO(Collection<TrainUserGroupPO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new TrainUserGroupBO());
	}

//	public static TrainUserGroupBO toBO(SaveTrainUserGroupRequest source) {
//		return BeanUtilsEx.copyProperties(source, () -> new TrainUserGroupBO(), true);
//	}
//
//	public static List<TrainUserGroupBO> toBO(Collection<SaveTrainUserGroupRequest> source) {
//		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new TrainUserGroupBO(), true);
//	}
//
//	public static GetTrainUserGroupResponse toResponse(TrainUserGroupBO source) {
//		return BeanUtilsEx.copyProperties(source, () -> new GetTrainUserGroupResponse());
//	}
//
//	public static List<GetTrainUserGroupResponse> toResponse(Collection<TrainUserGroupBO> source) {
//		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new GetTrainUserGroupResponse());
//	}
//
//	public static TrainUserGroupQuery toQuery(ListTrainUserGroupRequest source) {
//		if(null == source) {
//			return null;
//		}
//		TrainUserGroupQuery target = new TrainUserGroupQuery(source.getPageIndex(), source.getPageSize());
//		BeanUtilsEx.copyProperties(source, target);
//		return target;
//	}

}
